import common.globaldefines
import traceback


class TestThreadManager(common.globaldefines.ThreadBase):

    def __init__(self):
        super(TestThreadManager, self).__init__()
        self._timer = None

    def onStarted(self):
        import application
        application.g_App.startTimer(5, self.cbfunc)

    def onHandle(self, op, *args):
        DebugPrint(op, args)

    def cbfunc(self):
        import threading
        DebugPrint(threading.current_thread(), "cbfunc!!")